package com.sunny.ynhz.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sunny.ynhz.R;
import com.sunny.ynhz.app.SNNApplication;
import com.sunny.ynhz.ui.base.AppBaseTranslationTitleBarActivity;
import com.sunny.ynhz.bean.ProblemWaitForAcceptBean;
import com.sunny.ynhz.ui.ProblemDeilActivity;

import java.util.List;

/**
 * Created by luao on 2017/7/14.
 */

public class ProblemWaitForDongAdapter extends BaseQuickAdapter<ProblemWaitForAcceptBean.DataBean, BaseViewHolder> {

    Context context;

    public ProblemWaitForDongAdapter(@Nullable List<ProblemWaitForAcceptBean.DataBean> data, Context context) {
        super(R.layout.item_problem_wait_for_dong, data);
        this.context = context;
    }


    @Override
    protected void convert(BaseViewHolder helper, ProblemWaitForAcceptBean.DataBean item) {
//        helper.getView(R.id)
        helper.setOnClickListener(R.id.ll_wa, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SNNApplication.type=3;
                AppBaseTranslationTitleBarActivity appBaseTranslationTitleBarActivity =(AppBaseTranslationTitleBarActivity)context
                        ;appBaseTranslationTitleBarActivity.doAcitivity(ProblemDeilActivity.class);
            }
        });

    }
}
